﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Filters;

namespace Y2.Controllers
{
    [LoginFilter]
    public class engage_resumeUpdateController : Controller
    {
        private readonly Iengage_resume he;

        public engage_resumeUpdateController(Iengage_resume he)
        {
            this.he = he;
        }

        public IActionResult engage_resumeUpdate(int? id)
        {
            ViewBag.rest_id = id;
            return View();
        }

        public IActionResult engage_resumeUpdateTo(int? id)
        {
            ViewBag.rest_id = id;
            return View();
        }
        //简历表回显
        public async Task<IActionResult> Jlcx(int id)
        {
            return Content(JsonConvert.SerializeObject(await he.Jlcx(id)));
        }
        //简历登记表修改,推荐
        public async Task<int> Upda(engage_resume release)
        {
            return await he.Upda(release);
        }
    }
}
